#include<bits/stdc++.h>

using namespace std;
using ll = long long;
#define endl '\n'
int a[] = {1, 2, 3, 4, 5, 6, 7, 8, 9}, target = 10;
int book[10];
int n = sizeof(a) / sizeof(a[0]);

void dfs(int k) {
    if (k >= n) {
        if (inner_product(a, a + n, book, 0) == target) {
            copy(book, book + n, ostream_iterator<int>(cout, ""));
            cout << endl;
        }
        return;
    }
    book[k] = 0;
    dfs(k + 1);
    book[k] = 1;
    dfs(k + 1);
}


int main() {
    dfs(0);

    return 0;
}
